/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 *
 */

export namespace PackInfo {
  export interface VersionObj {
    code: number;
    name: string;
    minCompatibleVersionCode?: number;
  }

  export interface AppObj {
    bundleName: string;
    version: VersionObj;
  }

  export interface FormObj {
    name: string;
    type: string;
    updateEnabled: boolean;
    scheduledUpdateTime: number;
    updateDuration: number;
    supportDimensions: string[];
    defaultDimension: string;
  }

  export interface AbilityObj {
    visible: boolean;
    name: string;
    label: string;
    forms?: FormObj[];
  }

  export interface DistroObj {
    moduleType: string;
    installationFree: boolean;
    deliveryWithInstall: boolean;
    moduleName: string;
  }

  export interface ApiVersionObj {
    compatible: number;
    releaseType: string;
    target: number;
  }

  export interface ExtensionAbilityObj {
    name: string;
    forms?: FormObj[];
  }

  export interface ModuleObj {
    mainAbility: string;
    deviceType: string[];
    abilities: AbilityObj[];
    extensionAbilities?: ExtensionAbilityObj[];
    distro: DistroObj;
    apiVersion: ApiVersionObj;
  }

  export interface SummaryObj {
    app: AppObj;
    modules: ModuleObj[];
  }

  export interface PackageObj {
    deviceType: string[];
    moduleType: string;
    deliveryWithInstall: boolean;
    name: string;
  }

  export interface PackInfoObj {
    summary: SummaryObj;
    packages: PackageObj[];
  }

  export interface PackHapPathsObj {
    jsonPath: string;
    resourcePath: string;
    indexPath: string;
    packInfoPath: string;
    outPath: string;
    shellApkPath?: string[];
    assetsPath: string;
    dexPath?: string;
  }
}
